Repository navigation
ui: pin the fork's UI bundle by version and recorded sha256; drop the moving latest fallback (card aecdb2f2) - #148
Merged
Conversation
… moving "latest" fallback
Card aecdb2f2. Every fork PR that builds llama-server failed at the UI step on 2026-11-17: a fork checkout's
LLAMA_BUILD_NUMBER (1) names no upstream bundle (b1 is 404), so ui-assets fell back to "latest", and upstream's
latest (sha256 2ecfaa5a..) dropped workbox[hash].js, which this fork's llama-ui-embed requires ("missing required
asset(s): workbox[hash].js", embed rc 1). The branch had passed hours earlier: "latest" moved underneath it.
- tools/ui: the bundle is b10909 with its sha256 recorded here (e549e4cc..), never derived from a build number. An
explicit HF_UI_VERSION env still overrides (verified against the bucket's own .sha256, as before).
- ui-assets.cmake: one named version, no "latest" candidate; a recorded sha256 must match the bucket's file and the
archive; a recorded bundle that cannot be provisioned fails the step instead of building without the UI.
Measured on the M5 (single-file compile of tools/ui/embed.cpp at nice 19, then `cmake -P scripts/ui-assets.cmake`):
b10909 embeds (rc 0); latest fails the embed (rc 1, missing workbox); the recorded hash provisions and writes
ui.cpp (rc 0); a wrong recorded hash refuses and fails the step (rc 1, no ui.cpp).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… only after verification Codex's review of 0c33ab3: a warm cache was reused on stamp == version and index.html alone, so a cache from before a digest was recorded, or a changed pin with the same version, skipped the new hash check. The stamp is now "<version> sha256=<recorded digest>" (the version alone when no digest is recorded), compared before reuse and written only after hf_download verified the archive. Measured on the M5 (cmake -P scripts/ui-assets.cmake, one binary dir): cold provisions and writes the receipt (rc 0); warm with the same pin reuses with no fetch (rc 0); an old version-only stamp fetches and verifies again (rc 0); a changed digest over a valid cache fetches, refuses the mismatch and fails the step (rc 1, receipt not overwritten). The expanded tree is not re-hashed per build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks every fork PR that builds llama-server (e.g. #147). Upstream's
latestUI bundle droppedworkbox[hash].json 2026-11-17 and the fork'sllama-ui-embedrefuses it, while the fork's build number names no upstream bundle (b1, 404).b10909, with sha256e549e4cc01c0312d3fffdf6d4e431bb84c294a95ddf10fa40c8c643fc5f6a776recorded in tools/ui/CMakeLists.txt. An explicitHF_UI_VERSIONenv still overrides.latestcandidate is gone. A recorded hash must match the bucket's file and the archive. A recorded bundle that can't be provisioned fails the step; it never silently builds without the UI.Measured (M5, 2026-11-17 ~15:00Z)
tools/ui/embed.cpp(single file, clang++ -O1, nice 19) run against both bundles: b10909 embeds (rc 0); latest fails (rc 1, missingworkbox[hash].js).cmake -P scripts/ui-assets.cmake: the recorded hash provisions and writes ui.cpp (rc 0); a wrong recorded hash refuses and fails the step (rc 1, no ui.cpp).🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo